entry: Don't try to handle Tab in entry completions
authorBenjamin Otte <otte@redhat.com>
Thu, 3 Nov 2011 21:03:22 +0000 (22:03 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 16 Dec 2011 19:09:11 +0000 (20:09 +0100)
Instead, fall through to the default handler after closing the
completion. This has the advantage of letting the file chooser entry
capture the tab key properly, so one can't accidentally move out of the
entry by pressing tab while the completion is popped up.

I also suspect it fixes bugs with weird tab keys and shift/ctrl
oddities. But who knows...

gtk/gtkentry.c

index 436a868ad90239beff9d86b6c1677e5a9bddc8f1..7769c5a1f6b5acb1009e23996c2bb647d0a4d3e6 100644 (file)
@@ -9527,18 +9527,13 @@ keypress_completion_out:
           event->keyval == GDK_KEY_KP_Tab ||
           event->keyval == GDK_KEY_ISO_Left_Tab) 
     {
-      GtkDirectionType dir = event->keyval == GDK_KEY_ISO_Left_Tab ? 
-       GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD;
-      
       _gtk_entry_reset_im_context (GTK_ENTRY (widget));
       _gtk_entry_completion_popdown (completion);
 
       g_free (completion->priv->completion_prefix);
       completion->priv->completion_prefix = NULL;
 
-      gtk_widget_child_focus (gtk_widget_get_toplevel (widget), dir);
-
-      return TRUE;
+      return FALSE;
     }
   else if (event->keyval == GDK_KEY_ISO_Enter ||
            event->keyval == GDK_KEY_KP_Enter ||